--
-- Definition of table `forum_moderators`
--

CREATE TABLE `forum_moderators` (
  `forumid` varchar(64) NOT NULL,
  `userid` varchar(64) NOT NULL
) ENGINE = INNODB;

--GO

--
-- Definition of table `blog`
--

CREATE TABLE `blog` (
  `blogid` varchar(64) NOT NULL,
  `title` text character set utf8 NOT NULL,
  `body` text character set utf8 NOT NULL,
  `userid` varchar(64) NOT NULL,
  `createdate` datetime NOT NULL,
  `private` tinyint(4) NOT NULL,
  PRIMARY KEY  (`blogid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `categories`
--

CREATE TABLE `categories` (
  `categoryid` varchar(64) NOT NULL,
  `parentcategoryid` varchar(64) default NULL,
  `name` text NOT NULL,
  `createdate` datetime NOT NULL,
  `archived` tinyint(3) default NULL,
  PRIMARY KEY  (`categoryid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `comments`
--

CREATE TABLE `comments` (
  `id` varchar(64) NOT NULL,
  `parentid` varchar(64) default NULL,
  `itemid` varchar(64) NOT NULL,
  `userid` varchar(64) default NULL,
  `subject` text character set utf8,
  `comments` text character set utf8 NOT NULL,
  `createdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `archived` tinyint(4) default '0',
  PRIMARY KEY  (`id`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `dbversion`
--

CREATE TABLE `dbversion` (
  `version` decimal(18,2) NOT NULL,
  `installdate` datetime NOT NULL,
  PRIMARY KEY  (`version`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `email`
--

CREATE TABLE `email` (
  `id` int(10) NOT NULL,
  `pageid` varchar(64) NOT NULL,
  `senderid` varchar(50) character set utf8 NOT NULL,
  `recipientid` varchar(50) character set utf8 NOT NULL,
  `msgid` int(10) NOT NULL,
  `iv_status` int(10) NOT NULL,
  `createdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `archived` tinyint(4) default '0',
  PRIMARY KEY  (`pageid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `email_message`
--

CREATE TABLE `email_message` (
  `msgid` int(10) NOT NULL auto_increment,
  `emailmsg` longtext NOT NULL,
  PRIMARY KEY  (`msgid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `email_notes`
--

CREATE TABLE `email_notes` (
  `emailid` int(10) NOT NULL,
  `emailnotes` longtext NOT NULL,
  PRIMARY KEY  (`emailid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `events`
--

CREATE TABLE `events` (
  `EventID` varchar(64) NOT NULL,
  `EventTitle` text character set utf8 NOT NULL,
  `EventDetails` text character set utf8 NOT NULL,
  `EventDate` datetime NOT NULL,
  `UserID` varchar(64) NOT NULL,
  `StartDate` datetime default NULL,
  `EndDate` datetime default NULL,
  `Day` int(10) default '0',
  `Month` int(10) default '0',
  `Year` int(10) default '0',
  `Hr` int(10) default '0',
  `Min` int(10) default '0',
  `Meridian` varchar(2) character set utf8 default NULL,
  `Occurenceid` varchar(64) default NULL,
  `Private` tinyint(4) default '0',
  PRIMARY KEY  (`EventID`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `folders`
--

CREATE TABLE `folders` (
  `nodeid` varchar(64) NOT NULL,
  `parentnodeid` varchar(64) default NULL,
  `name` text NOT NULL,
  `createdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `archived` tinyint(3) default '0',
  `userid` varchar(64) default NULL,
  PRIMARY KEY  (`nodeid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `forum_board`
--

CREATE TABLE `forum_board` (
  `BoardID` varchar(64) NOT NULL,
  `BoardName` varchar(200) character set utf8 NOT NULL,
  `LastPostBy` text character set utf8,
  `LastUserID` varchar(64) default NULL,
  `LastPostDate` datetime default NULL,
  `SortOrder` int(10) default NULL,
  PRIMARY KEY  (`BoardID`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `forum_category`
--

CREATE TABLE `forum_category` (
  `CategoryID` varchar(64) NOT NULL,
  `BoardID` varchar(64) NOT NULL,
  `CategoryName` varchar(500) character set utf8 NOT NULL,
  `SortOrder` int(10) NOT NULL,
  `LastPostBy` text character set utf8,
  `LastUserID` varchar(64) default NULL,
  `LastPostDate` datetime default NULL,
  PRIMARY KEY  (`CategoryID`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `forum_forum`
--

CREATE TABLE `forum_forum` (
  `ForumID` varchar(64) NOT NULL,
  `CategoryID` varchar(64) NOT NULL,
  `ForumName` text character set utf8 NOT NULL,
  `Description` text character set utf8 NOT NULL,
  `SortOrder` int(10) NOT NULL,
  `TopicsCount` int(10) default NULL,
  `PostsCount` int(10) default NULL,
  `LastPostBy` text character set utf8,
  `LastUserID` varchar(64) default NULL,
  `LastPostDate` datetime default NULL,
  `Locked` tinyint(4) default NULL,
  `Moderated` tinyint(4) default NULL,  
  PRIMARY KEY  (`ForumID`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `forum_post`
--

CREATE TABLE `forum_post` (
  `PostID` varchar(64) NOT NULL,
  `TopicID` varchar(64) NOT NULL,
  `RepliedTo` varchar(64) default NULL,
  `UserID` varchar(64) NOT NULL,
  `Created` datetime NOT NULL,
  `Post` text NOT NULL,
  `Edited` datetime default NULL,
  `IsApproved` tinyint(4) default NULL,
  PRIMARY KEY  (`PostID`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `forum_topic`
--

CREATE TABLE `forum_topic` (
  `TopicID` varchar(64) NOT NULL,
  `ForumID` varchar(64) NOT NULL,
  `TopicName` text character set utf8 NOT NULL,
  `UserID` varchar(64) NOT NULL,
  `Created` datetime NOT NULL,
  `Views` int(10) default NULL,
  `PostsCount` int(10) default NULL,
  `LastPostBy` text character set utf8,
  `LastUserID` varchar(64) default NULL,
  `LastPostDate` datetime default NULL,
  `Sticky` tinyint(4) default NULL,
  `IsApproved` tinyint(4) default NULL,
  PRIMARY KEY  (`TopicID`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `int_value`
--

CREATE TABLE `int_value` (
  `int_name` varchar(2000) character set utf8 NOT NULL,
  `int_value` int(10) NOT NULL,
  `longdesc` varchar(4000) character set utf8 NOT NULL,
  `shortdesc` varchar(2000) character set utf8 NOT NULL
) ENGINE = INNODB;

--GO

--
-- Definition of table `item_categories`
--

CREATE TABLE `item_categories` (
  `itemid` varchar(64) NOT NULL,
  `categoryid` varchar(64) NOT NULL
) ENGINE = INNODB;

--GO

--
-- Definition of table `item_properties`
--

CREATE TABLE `item_properties` (
  `itemid` varchar(64) NOT NULL,
  `propertyid` varchar(64) NOT NULL
) ENGINE = INNODB;

--GO

--
-- Definition of table `item_resources`
--

CREATE TABLE `item_resources` (
  `itemid` varchar(64) NOT NULL,
  `resourceid` varchar(64) NOT NULL
) ENGINE = INNODB;

--GO

--
-- Definition of table `links`
--

CREATE TABLE `links` (
  `linkid` varchar(64) NOT NULL,
  `linktitle` text character set utf8 NOT NULL,
  `linkurl` text character set utf8 NOT NULL,
  `linkdesc` text character set utf8,
  `userid` varchar(64) NOT NULL,
  `createdate` datetime NOT NULL,
  PRIMARY KEY  (`linkid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `news`
--

CREATE TABLE `news` (
  `newsid` varchar(64) NOT NULL,
  `title` text character set utf8,
  `body` text character set utf8 NOT NULL,
  `createdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `expiredate` datetime default NULL,
  `archived` tinyint(4) default '0',
  `sticky` tinyint(4) default '0',
  `userid` varchar(64) default NULL,
  PRIMARY KEY  (`newsid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `options`
--

CREATE TABLE `options` (
  `OptionsID` varchar(64) NOT NULL,
  `ItemID` varchar(64) NOT NULL,
  `AllowSummary` tinyint(4) NOT NULL default '0',
  `AllowComments` tinyint(4) NOT NULL default '0',
  `AllowTags` tinyint(4) NOT NULL default '0',
  `AllowSubscriptions` tinyint(4) NOT NULL default '0',
  `AllowRanking` tinyint(4) NOT NULL default '0',
  `AllowInfoTools` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`OptionsID`,`ItemID`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `page`
--

CREATE TABLE `page` (
  `pageid` varchar(64) NOT NULL,
  `kbid` int(10) NOT NULL,
  `createdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `publishdate` datetime default NULL,
  `expiredate` datetime default NULL,
  `statusdate` datetime default NULL,
  `currentuserid` varchar(64) default NULL,
  `title` text NOT NULL,
  `iv_access_type` int(10) NOT NULL default '0',
  `iv_level` int(10) NOT NULL default '0',
  `iv_status` int(10) NOT NULL default '0',
  `iv_priority` int(10) NOT NULL default '0',
  `templateid` varchar(64) NOT NULL,
  `keywords` varchar(8000) NOT NULL default 'No Keywords Defined',
  `pagerevision` int(10) default '0',
  `iv_itemtype` int(10) NOT NULL default '1',
  `spotlight` tinyint(4) default '0',
  `userid` varchar(64) default NULL,
  PRIMARY KEY  (`pageid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `page_archive_data`
--

CREATE TABLE `page_archive_data` (
  `id` varchar(64) NOT NULL,
  `pageid` varchar(64) NOT NULL,
  `modifydate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `placeholdernumber` int(10) NOT NULL,
  `placeholderdata` text,
  `lastuserid` varchar(64) default NULL,
  `pagerevision` int(10) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `page_final_data`
--

CREATE TABLE `page_final_data` (
  `id` varchar(64) NOT NULL,
  `pageid` varchar(64) NOT NULL,
  `modifydate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `placeholdernumber` int(10) NOT NULL,
  `placeholderdata` text,
  `lastuserid` varchar(64) default NULL,
  `pagerevision` int(10) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `page_hits`
--

CREATE TABLE `page_hits` (
  `id` varchar(64) NOT NULL,
  `pageid` varchar(64) NOT NULL,
  `userid` varchar(64) default NULL,
  `userrank` int(10) NOT NULL,
  `pagerevision` int(10) NOT NULL default '0',
  `views` int(10) NOT NULL default '0',
  `iv_access_type` int(10) NOT NULL default '0',
  `createdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `page_suggestion`
--

CREATE TABLE `page_suggestion` (
  `pageid` varchar(64) NOT NULL,
  `suggestionid` varchar(64) NOT NULL
) ENGINE = INNODB;

--GO

--
-- Definition of table `page_summary`
--

CREATE TABLE `page_summary` (
  `pageid` varchar(64) NOT NULL,
  `summary` text NOT NULL
) ENGINE = INNODB;

--GO

--
-- Definition of table `page_working_data`
--

CREATE TABLE `page_working_data` (
  `id` varchar(64) NOT NULL,
  `pageid` varchar(64) NOT NULL,
  `placeholdernumber` int(10) NOT NULL,
  `placeholderdata` text,
  `lastuserid` varchar(64) default NULL,
  `pagerevision` int(10) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `pollanswers`
--

CREATE TABLE `pollanswers` (
  `PollId` varchar(64) NOT NULL,
  `AnswerId` varchar(64) NOT NULL,
  `AnswerText` text NOT NULL,
  `AnswerCount` decimal(18,0) default '0',
  PRIMARY KEY  (`AnswerId`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `pollquestions`
--

CREATE TABLE `pollquestions` (
  `PollId` varchar(64) NOT NULL,
  `PollQuestion` text NOT NULL,
  `ExpirationDate` datetime default NULL,
  `UserID` varchar(64) NOT NULL,
  `CreateDate` datetime NOT NULL,
  `Closed` tinyint(4) NOT NULL default '0',
  `AnswerCount` decimal(18,0) NOT NULL default '0',
  PRIMARY KEY  (`PollId`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `pollresults`
--

CREATE TABLE `pollresults` (
  `PollId` varchar(64) NOT NULL,
  `PollChoice` varchar(64) NOT NULL,
  `userid` varchar(64) NOT NULL,
  PRIMARY KEY  (`PollId`,`userid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `private_message`
--

CREATE TABLE `private_message` (
  `PrivateMessageID` varchar(64) NOT NULL,
  `FromUserID` varchar(64) NOT NULL,
  `Subject` text character set utf8 NOT NULL,
  `Body` text character set utf8 NOT NULL,
  `CreateDate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `archived` tinyint(4) default '0',
  PRIMARY KEY  (`PrivateMessageID`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `properties`
--

CREATE TABLE `properties` (
  `propertyid` varchar(64) NOT NULL,
  `parentpropertyid` varchar(64) default NULL,
  `name` text NOT NULL,
  `createdate` datetime NOT NULL,
  `archived` tinyint(3) default '0',
  PRIMARY KEY  (`propertyid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `ranks`
--

CREATE TABLE `ranks` (
  `id` varchar(64) NOT NULL,
  `itemid` varchar(64) NOT NULL,
  `userid` varchar(64) NOT NULL,
  `rank` int(10) NOT NULL default '0',
  `revision` int(10) default '0',
  PRIMARY KEY  (`id`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `resources`
--

CREATE TABLE `resources` (
  `resourceid` varchar(64) NOT NULL,
  `resourcename` text NOT NULL,
  `resourcesize` int(10) NOT NULL,
  `resourcedesc` text,
  `resourcetitle` varchar(300) character set utf8 default NULL,
  `contenttype` text NOT NULL,
  `resource` longblob NOT NULL,
  `thumbnail` longblob,
  `archived` tinyint(3) default '0',
  `createdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `private` tinyint(4) default '0',
  `userid` varchar(64) default NULL,
  PRIMARY KEY  (`resourceid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `resources_folders`
--

CREATE TABLE `resources_folders` (
  `resourceid` varchar(64) NOT NULL,
  `nodeid` varchar(64) NOT NULL
) ENGINE = INNODB;

--GO

--
-- Definition of table `security`
--

CREATE TABLE `security` (
  `id` varchar(64) NOT NULL,
  `secureitemid` varchar(64) NOT NULL,
  `rolename` varchar(256) character set utf8 NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `sitemap`
--

CREATE TABLE `sitemap` (
  `ID` int(10) NOT NULL auto_increment,
  `Title` text,
  `Description` text,
  `Url` text,
  `Roles` text,
  `Parent` int(10) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1;

--GO

--
-- Definition of table `subscriptions`
--

CREATE TABLE `subscriptions` (
  `subscriptionid` varchar(64) NOT NULL,
  `userid` varchar(64) NOT NULL,
  `itemid` varchar(64) NOT NULL,
  `notify` tinyint(4) default '0',
  `archived` tinyint(4) default '0',
  `iv_subscriptiontype` int(10) default '0',
  PRIMARY KEY  (`subscriptionid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `suggestion`
--

CREATE TABLE `suggestion` (
  `suggestionid` varchar(64) NOT NULL,
  `createdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `suggestdesc` text NOT NULL,
  `suggestedbyemail` varchar(8000) NOT NULL default 'NA',
  `iv_itemtype` int(10) NOT NULL default '2',
  `archived` tinyint(4) default '0',
  PRIMARY KEY  (`suggestionid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `tags`
--

CREATE TABLE `tags` (
  `tagid` varchar(64) NOT NULL,
  `userid` varchar(64) NOT NULL,
  `itemid` varchar(64) NOT NULL,
  `tagname` text character set utf8 NOT NULL,
  `archived` tinyint(4) default '0',
  `iv_tagtype` int(10) default '0',
  PRIMARY KEY  (`tagid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `template_header`
--

CREATE TABLE `template_header` (
  `templateid` varchar(64) NOT NULL,
  `templatename` varchar(500) character set utf8 NOT NULL,
  `numberofplaceholders` int(10) NOT NULL default '0',
  `archived` tinyint(4) default '0',
  PRIMARY KEY  (`templateid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `templates`
--

CREATE TABLE `templates` (
  `id` varchar(64) NOT NULL,
  `templateid` varchar(64) NOT NULL,
  `placeholdernumber` int(10) NOT NULL default '0',
  `fieldname` varchar(50) character set utf8 NOT NULL,
  `fieldtype` int(10) default NULL,
  `fieldheight` int(10) NOT NULL,
  `fieldwidth` int(10) NOT NULL,
  `editortype` int(10) default NULL,
  `showname` tinyint(4) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `themes`
--

CREATE TABLE `themes` (
  `themeid` varchar(64) NOT NULL,
  `themename` text character set utf8 NOT NULL,
  `themefolder` text character set utf8 NOT NULL,
  `usagecount` int(10) default NULL,
  `archived` tinyint(4) default '0',
  PRIMARY KEY  (`themeid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `user_private_message`
--

CREATE TABLE `user_private_message` (
  `UserPrivateMessageID` varchar(64) NOT NULL,
  `UserID` varchar(64) NOT NULL,
  `PrivateMessageID` varchar(64) NOT NULL,
  `IsViewed` tinyint(4) default '0',
  PRIMARY KEY  (`UserPrivateMessageID`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `usercontrols`
--

CREATE TABLE `usercontrols` (
  `id` varchar(64) NOT NULL,
  `controlid` int(10) NOT NULL auto_increment,
  `displayname` varchar(2000) character set utf8 NOT NULL,
  `controlpath` varchar(4000) character set utf8 NOT NULL,
  `controlname` varchar(4000) character set utf8 NOT NULL,
  PRIMARY KEY  (`controlid`)
) ENGINE = INNODB;

--GO

--
-- Definition of table `views`
--

CREATE TABLE `views` (
  `itemid` varchar(64) NOT NULL,
  `viewcount` bigint(19) NOT NULL
) ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_Applications`
--

CREATE TABLE `aspnet_Applications` (
  `ApplicationName` VARCHAR(255) NULL,
  `ApplicationId` varchar(64) NOT NULL,
  `Description` VARCHAR(255) NULL,
  PRIMARY KEY (`ApplicationName`),
  UNIQUE INDEX `ApplicationId` (`ApplicationId`),
  UNIQUE INDEX `ApplicationName` (`ApplicationName`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_Membership`
--

CREATE TABLE `aspnet_Membership` (
  `UserId` varchar(64) NULL,
  `ApplicationId` varchar(64) NOT NULL,
  `Password` VARCHAR(128) NULL,
  `PasswordFormat` INT(10) NULL,
  `PasswordSalt` VARCHAR(128) NULL,  
  `MobilePIN` VARCHAR(16) NULL,
  `Email` VARCHAR(128) NULL,
  `PasswordQuestion` VARCHAR(255) NULL,
  `PasswordAnswer` VARCHAR(128) NULL,
  `IsApproved` TINYINT(1) NOT NULL,
  `IsLockedOut` TINYINT(1) NOT NULL,  
  `CreateDate` DATETIME NULL,
  `LastLoginDate` DATETIME NULL,
  `LastPasswordChangedDate` DATETIME NULL,
  `Comment` LONGTEXT NULL,
  PRIMARY KEY (`UserId`),
  UNIQUE INDEX `aspnet_Usersaspnet_Membership` (`UserId`),
  UNIQUE INDEX `UserId` (`UserId`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_PagePersonalizationAllUsers`
--

CREATE TABLE `aspnet_PagePersonalizationAllUsers` (
  `PathId` varchar(64) NULL,
  `PageSettings` LONGTEXT NULL,
  `LastUpdatedDate` DATETIME NULL,
  PRIMARY KEY (`PathId`),
  UNIQUE INDEX `aspnet_Urlsaspnet_UrlPersonalizationAllUsersData` (`PathId`),
  UNIQUE INDEX `UrlId` (`PathId`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_PagePersonalizationPerUser`
--

CREATE TABLE `aspnet_PagePersonalizationPerUser` (
  `Id` varchar(64) NOT NULL,
  `PathId` varchar(64) NULL,
  `UserId` varchar(64) NULL,
  `PageSettings` LONGTEXT NULL,
  `LastUpdatedDate` DATETIME NULL,
  PRIMARY KEY (`Id`),
  INDEX `aspnet_Urlsaspnet_UrlPersonalizationPerUserData` (`PathId`),
  INDEX `aspnet_Usersaspnet_UrlPersonalizationPerUserData` (`UserId`),
  INDEX `Id` (`Id`),
  INDEX `UrlId` (`PathId`),
  INDEX `UserId` (`UserId`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_Paths`
--

CREATE TABLE `aspnet_Paths` (
  `ApplicationId` varchar(64) NULL,
  `PathId` varchar(64) NOT NULL,
  `Path` VARCHAR(255) NULL,
  PRIMARY KEY (`PathId`),
  INDEX `ApplicationId` (`ApplicationId`),
  INDEX `aspnet_Applicationsaspnet_Urls` (`ApplicationId`),
  INDEX `Url` (`Path`),
  INDEX `UrlId` (`PathId`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_Profile`
--

CREATE TABLE `aspnet_Profile` (
  `UserId` varchar(64) NULL,
  `PropertyNames` LONGTEXT NULL,
  `PropertyValuesString` LONGTEXT NULL,
  `LastUpdatedDate` DATETIME NULL,
  PRIMARY KEY (`UserId`),
  UNIQUE INDEX `aspnet_Usersaspnet_Personalization` (`UserId`),
  UNIQUE INDEX `UserId` (`UserId`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_Roles`
--

CREATE TABLE `aspnet_Roles` (
  `ApplicationId` varchar(64) NULL,
  `RoleId` varchar(64) NOT NULL,
  `RoleName` VARCHAR(255) NULL,
  `Description` VARCHAR(255) NULL,
  PRIMARY KEY (`RoleId`),
  INDEX `ApplicationId` (`ApplicationId`),
  INDEX `aspnet_Applicationsaspnet_Roles` (`ApplicationId`),
  INDEX `RoleId` (`RoleId`),
  INDEX `RoleName` (`RoleName`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_SiteCounters`
--

CREATE TABLE `aspnet_SiteCounters` (
  `Id` varchar(64) NOT NULL,
  `Application` LONGTEXT NULL,
  `PageUrl` LONGTEXT NULL,
  `CounterGroup` LONGTEXT NULL,
  `CounterName` LONGTEXT NULL,
  `CounterEvent` LONGTEXT NULL,
  `NavigateUrl` LONGTEXT NULL,
  `StartTime` DATETIME NULL,
  `EndTime` DATETIME NULL,
  `Total` INT(10) NULL,
  UNIQUE INDEX `Id` (`Id`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_Users`
--

CREATE TABLE `aspnet_Users` (
  `UserId` varchar(64) NOT NULL,  
  `ApplicationId` varchar(64) NULL,
  `UserName` VARCHAR(255) NULL,
  `MobileAlias` VARCHAR(16) NULL,
  `IsAnonymous` TINYINT(1) NOT NULL,
  `LastActivityDate` DATETIME NULL,
  PRIMARY KEY (`UserId`),
  UNIQUE INDEX `UserId` (`UserId`),
  INDEX `ApplicationId` (`ApplicationId`),
  INDEX `aspnet_Applicationsaspnet_Users` (`ApplicationId`),
  INDEX `UserName` (`UserName`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `aspnet_UsersInRoles`
--

CREATE TABLE `aspnet_UsersInRoles` (
  `UserId` varchar(64) NULL,
  `RoleId` varchar(64) NULL,
  INDEX `aspnet_Rolesaspnet_UsersInRoles` (`RoleId`),
  INDEX `aspnet_Usersaspnet_UsersInRoles` (`UserId`),
  INDEX `RoleId` (`RoleId`),
  INDEX `UserId` (`UserId`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `form_controls`
--

CREATE TABLE `form_controls` (
  `FormControlID` VARCHAR(64) NOT NULL DEFAULT newid(),
  `ControlType` INT(10) NOT NULL,
  `Control` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ControlName` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `RequiresRows` TINYINT NOT NULL,
  `RequiresColumns` TINYINT NOT NULL,
  PRIMARY KEY (`FormControlID`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `form_answerrowcolumn`
--

CREATE TABLE `form_answerrowcolumn` (
  `FormResponseID` VARCHAR(64) NOT NULL,
  `FormQuestionID` VARCHAR(64) NOT NULL,
  `FormAnswerID` VARCHAR(64) NOT NULL,
  `FormRowID` VARCHAR(64) NOT NULL,
  `FormColumnID` VARCHAR(64) NULL,
  `IsSelected` TINYINT NOT NULL, 
  PRIMARY KEY (`FormAnswerID`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `form_answer`
--

CREATE TABLE `form_answer` (
  `FormResponseID` VARCHAR(64) NOT NULL,
  `FormQuestionID` VARCHAR(64) NOT NULL,
  `FormAnswerID` VARCHAR(64) NOT NULL,
  `Answer` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`FormAnswerID`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `form_response`
--

CREATE TABLE `form_response` (
  `FormID` VARCHAR(64) NOT NULL,
  `FormResponseID` VARCHAR(64) NOT NULL,
  `TakenBy` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `TakenDate` DATETIME NOT NULL,
  `Reviewed` TINYINT NULL,
  `ReviewedBy` VARCHAR(64) NULL,
  `ReviewerComments` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `ReviewedDate` DATETIME NULL,
  PRIMARY KEY (`FormResponseID`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `form_question`
--

CREATE TABLE `form_question` (
  `FormID` VARCHAR(64) NOT NULL,
  `FormQuestionID` VARCHAR(64) NOT NULL,
  `Question` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `FormControlID` VARCHAR(64) NOT NULL,
  `FormControlWidth` INT(10) NULL,
  `FormControlHeight` INT(10) NULL,
  `FormControlRows` INT(10) NULL,
  `FormControlCols` INT(10) NULL,
  `FormControlLayout` INT(10) NULL,
  `FormPage` INT(10) NOT NULL,
  `IsRequired` TINYINT NULL,
  `RequiredText` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `IsRegularExpressionValidatorRequired` TINYINT NULL,
  `RegularExpression` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `RegularExpressionValidatorText` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `IsCompareValidatorRequired` TINYINT NULL,
  `CompareValidatorType` INT(10) NULL,
  `CompareValidatorText` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `IsRangeValidatorRequired` TINYINT NULL,
  `RangeValidatorText` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `RangeStart` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `RangeEnd` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `CreateDate` DATETIME NOT NULL,	
  `SortOrder` INT(10) NOT NULL,	
  `IsOtherOption` TINYINT NULL,
  `OtherOptionText` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,  
  PRIMARY KEY (`FormQuestionID`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `form`
--

CREATE TABLE `form` (
  `FormID` VARCHAR(64) NOT NULL,
  `FormName` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `AllowMultipleResponses` TINYINT NOT NULL,
  `CurrentUserID` VARCHAR(64) NULL,
  `IV_FormType` INT(10) NOT NULL,
  `ExpireDate` DATETIME NULL,
  `UserID` VARCHAR(64) NOT NULL,
  `FormCompleteMessage` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  `CreateDate` DATETIME NOT NULL,
  `ModifiedUserID` VARCHAR(64) NULL,
  `ModifiedDate` DATETIME NULL,
  `RegisteredUserOnly` TINYINT NULL,  
  PRIMARY KEY (`FormID`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `form_questionrows`
--

CREATE TABLE `form_questionrows` (
  `FormQuestionID` VARCHAR(64) NOT NULL,
  `FormRowID` VARCHAR(64) NOT NULL,
  `RowChoice` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CreateDate` DATETIME NOT NULL,	
  `IsOtherOption` TINYINT NOT NULL,  
  `SortOrder` INT(10) NOT NULL,	
  PRIMARY KEY (`FormRowID`)
)
ENGINE = INNODB;

--GO

--
-- Definition of table `form_questioncolumns`
--

CREATE TABLE `form_questioncolumns` (
  `FormQuestionID` VARCHAR(64) NOT NULL,
  `FormColumnID` VARCHAR(64) NOT NULL,
  `ColumnChoice` VARCHAR(-1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CreateDate` DATETIME NOT NULL,	
  `SortOrder` INT(10) NOT NULL,	  
  PRIMARY KEY (`FormColumnID`)
)
ENGINE = INNODB;